### Request validation and execution

if(in_array($function, $services[$service])){
 require $files[$service];
 $ret = call_user_func_array($function, $parameters);
} else {
 die('Call not allowed');
}

$json = json_encode($ret);
checkLastJsonError();
print $json;
?>